import Vue from 'vue'
const host = process.env.API_HOST

export const login = (acount, pwd, captchaId, captchaTxt) => {
  return Vue.http.post(`${host}/web/login`, { acount, pwd, captchaId, captchaTxt })
}

export const user = () => {
  return Vue.http.get(`${host}/m/user`)
}

export const genCaptcha = captchaId => {
  return Vue.http.post(`${host}/common/captcha`, { captchaId })
}
